package com.redstars.generate.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.redstars.generate.entity.SysTableField;
import com.redstars.generate.page.PageResult;
import com.redstars.generate.vo.SysTableFieldVo;
import com.redstars.generate.query.SysTableFieldQuery;
import java.util.List;

/**
 * 代码生成表字段
 *
 * @author zhouhx 
 * @since 1.0.0 2022-10-05
 */
public interface SysTableFieldService extends IService<SysTableField> {
    /**
    *
    * @description 分页查询
    * @author zhouhx 
    * @since 1.0.0 2022-10-05
    */
    PageResult<SysTableFieldVo> page(SysTableFieldQuery query);
    /**
    *
    * @description 新增
    * @author zhouhx 
    * @since 1.0.0 2022-10-05
    */
    void save(SysTableFieldVo vo);
    /**
    *
    * @description 修改
    * @author zhouhx 
    * @since 1.0.0 2022-10-05
    */
    void update(SysTableFieldVo vo);
    /**
    *
    * @description 删除
    * @author zhouhx 
    * @since 1.0.0 2022-10-05
    */
    void delete(List<Long> idList);
    /**
    *
    * @description 详情
    * @author zhouhx 
    * @since 1.0.0 2022-10-05
    */
    SysTableFieldVo detail(SysTableFieldQuery query);

    /**
     *
     * @author zhuohx
     * @description 修改表字段数据
     * @parms  [tableId表ID, tableFieldList字段列表]
     * @return void
     * @throws
     * @date 2022/10/6 8:59
     */
    void updateTableField(Long tableId, List<SysTableFieldVo> tableFieldList);

    /**
     *
     * @author zhuohx
     * @description 初始化字段数据
     * @parms  [tableFieldList]
     * @return void
     * @throws
     * @date 2022/10/6 9:25
     */
    void initFieldList(List<SysTableField> tableFieldList);

    /**
     *
     * @author zhuohx
     * @description 根据表名获取字段
     * @parms  [tableId]
     * @return java.util.List<com.redstars.generate.vo.SysTableFieldVo>
     * @throws
     * @date 2022/10/18 14:38
     */
    List<SysTableFieldVo> getByTableId(Long tableId);

    /**
     *
     * @author zhuohx
     * @description 根据tableId删除字段
     * @parms  [tableIds]
     * @return void
     * @throws
     * @date 2022/10/18 14:53
     */
    void deleteBatchTableIds(List<Long> tableIds);
}